package com.yyg.usecase.datastructure;

import org.junit.Test;

public class LRUCacheTest {
    @Test
    public void lRUCacheTestTest() {
        LRUCache<Integer, String> lruCache = new LRUCache<>(3);

        lruCache.put(1, "One");
        lruCache.put(2, "Two");
        lruCache.put(3, "Three");
        lruCache.display();

        lruCache.get(1);
        lruCache.put(4, "Four");
        lruCache.display();

        lruCache.put(5, "Five");
        lruCache.display();
    }
}
